package com.tfnswebdesign.common {
  
  /************************************
    ServiceAuth
    [description]
  ************************************/
  
  /*-- imports --*/
  
	public class SessionIDAuth implements iServiceAuth {
    /*-- variables --*/
    private var sessionID:String;
    
    public function SessionIDAuth() {
      sessionID = "";
    }
    
    public function register(serverData:*) {
      if (serverData['sessid']) {
        sessionID = serverData['sessid'];
      } else {
        sessionID = "";
      }
      
    }
       
		public function authenticate(serverVariables:Array) {
		  var authVariables = new Array();
		  authVariables[0] = sessionID;
		  return authVariables.concat(serverVariables);
		}	
	}	
}